/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package mehraktest;
import java.sql.*;

/**
 *
 * @author mehrak
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Connection conn = null;
        Statement statement = null;

        try
           {



            String userName = "hcidb";
               String password = "Testdb123";
               //String url = "jdbc:mysql://10.6.171.105/hcidb";
               String url = "jdbc:mysql://hcidb.db.4467874.hostedresource.com/hcidb";
               Class.forName ("com.mysql.jdbc.Driver");
               conn = DriverManager.getConnection (url, userName, password);
               statement = conn.createStatement();

               System.out.println ("Database connection established");
           }
           catch (SQLException e) {
            System.out.println("SQL Exception: "+ e.toString());
        } catch (ClassNotFoundException cE) {
            System.out.println("Class Not Found Exception: "+ cE.toString());
       }




    }

}
